package cn.wolfcode.luowowo.search.service;

import cn.wolfcode.luowowo.search.query.StrategySaechQuery;
import cn.wolfcode.luowowo.search.template.StrategyTemplate;
import cn.wolfcode.luowowo.search.vo.StatisVO;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

public interface IStrategySearchService {
    /**
     * 添加或保存
     * @param template
     */
    void saveOrUpdate(StrategyTemplate template);

    /**
     * 主题排行前十
     *      * map:
     *  string:key
     *  object:对应的对象(主题的di,主题名,总数)
     *  dest:
     *      key:dest
     *      value:list<dest> destId1,destId2....
     * @return
     */
    List<Map<String, Object>> queryThemeTop10();

    /**
     * 查询推荐主题
     * @return
     */
    List<StatisVO> queryConditionThemeGroup();

    /**
     * 推荐国内
     * @return
     */
    List<StatisVO> queryConditionProvincesGroup();

    /**
     * 国外
     * @return
     */
    List<StatisVO> queryConditionAbroadsGroup();

    Page query(StrategySaechQuery qo);

    List<StrategyTemplate> findByName(String name);
}
